﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.RunModels.Base
{
    public class UpExtResposeResult<T>
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool is_success { get; set; }

        /// <summary>
        /// 实际数据
        /// </summary>
        public T data { get; set; }

        /// <summary>
        /// 错误信息提示
        /// </summary>
        public string error_message { get; set; }
    }
    public class UpExtDepartModel
    {
        /// <summary>
        /// 部门编号
        /// </summary>
        public string dept_id { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>

        public string cn_name { get; set; }

        /// <summary>
        /// 部门英文名
        /// </summary>

        public string en_name { get; set; }

        /// <summary>
        /// 部门等级
        /// </summary>

        public string rank { get; set; }
        /// <summary>
        /// 上级部门编号
        /// </summary>
        public string parent_id { get; set; }
        /// <summary>
        /// 是否线体部门
        /// </summary>
        public string line_dept { get; set; }
    }

    public class UpExtUserAttendModel
    {
        /// <summary>
        /// 员工编号
        /// </summary>
        public string employee_id { get; set; }

        /// <summary>
        /// 刷卡时间
        /// </summary>
        public DateTime? punch_time { get; set; }
    }


    public class UpExtUserModel
    {
        /// <summary>
        /// 员工编号
        /// </summary>
        public string emp_id { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string cn_name { get; set; }
        /// <summary>
        /// 英文名
        /// </summary>
        public string en_name { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        public string login_name { get; set; }

        /// <summary>
        /// 主岗部门编号
        /// </summary>
        public string dept_id { get; set; }

        /// <summary>
        /// 主岗职位编号
        /// </summary>
        public string job_id { get; set; }
        /// <summary>
        /// 主岗职位名称
        /// </summary>
        public string job_name { get; set; }

        /// <summary>
        /// 性别 1-男、2-女
        /// </summary>
        public string sex { get; set; }
        /// <summary>
        /// 在职状态 1-在职、2-离职
        /// </summary>
        public string emp_status { get; set; }

        /// <summary>
        /// 标准职位编码
        /// </summary>
        public string position_id { get; set; }
        /// <summary>
        /// 职位序列代码
        /// </summary>
        public string sequ_id { get; set; }

        /// <summary>
        /// 职位序列名称
        /// </summary>
        public string sequ_name { get; set; }
        /// <summary>
        /// 职位子序列代码
        /// </summary>
        public string subsq_id { get; set; }
        /// <summary>
        /// 职位子序列名称
        /// </summary>
        public string subsq_name { get; set; }
        /// <summary>
        /// 职位类别
        /// </summary>
        public string job_class { get; set; }
        /// <summary>
        /// 工作属地 1-厦门、2-长泰、3-四川、4-深圳、5-台湾-台北、6-美国、7-德国、8-日本、9-澳大利亚、10-中东、11-外区域、12-西安、13-苏州、21-泰国、22-台湾-新竹、23-上海、24-南非、25-埃及
        /// </summary>
        public string work_territory { get; set; }

        /// <summary>
        /// 入职日期
        /// </summary>
        public DateTime entry_date { get; set; }

        /// <summary>
        /// 直间接分类
        /// 1-直接、2-间接、3-间接辅助（线长、助线），体现主岗职位的标准职位的直间接分类
        /// </summary>
        public string dir_indir_class { get; set; }
    }

    public class HRSyncByDepartParamModel
    {
        public string OrgId { get; set; }

        public string Url { get; set; }

        public string ApiKey { get; set; }
    }

    public class HRSyncByDepartResultModel
    {
        public decimal Count { get; set; }
        public string Message { get; set; }

        public List<HRSyncByDepartDetailResultModel> Details { get; set; } = new List<HRSyncByDepartDetailResultModel>();

    }

    public class HRSyncByDepartDetailResultModel
    {
        public string Id { get; set; }

        public string Code { get; set; }

        public string Name { get; set; }

        public string ParentCode { get; set; }
        public string ParentId { get; set; }
    }





    public class HRSyncByUserParamModel
    {
        public string OrgId { get; set; }

        public string Url { get; set; }

        public string DefaultRoleCodes { get; set; }

        public string ApiKey { get; set; }

        public bool IsCheckLeaveUser { get; set; } = true;
    }


    public class HRSyncByDepartAttendParamModel
    {
        public string OrgId { get; set; }

        public string Url { get; set; }

        public List<string> DepartCodes { get; set; }
    }

    public class HRSyncByDepartAttendResultModel
    {

        public List<HRSyncByDepartAttendDetailResultModel> Details { get; set; } = new List<HRSyncByDepartAttendDetailResultModel>();

    }

    public class HRSyncByDepartAttendDetailResultModel
    {
        /// <summary>
        /// 部门编号
        /// </summary>
        public string DepartCode { get; set; }

        /// <summary>
        /// 应出勤人数
        /// </summary>
        public int PlanAttendUserQty { get; set; }

        /// <summary>
        /// 实际出勤人数
        /// </summary>
        public int AuttendUserQty { get; set; }

        public List<string> UnAttendUserCodes { get; set; } = new List<string>();
    }

    public class HRSyncByUserResultModel
    {
        public decimal Count { get; set; }
        public string Message { get; set; }

        public List<HRSyncByUserDetailResultModel> Details { get; set; } = new List<HRSyncByUserDetailResultModel>();

    }

    public class HRSyncByUserDetailResultModel
    {
        public string DepartId { get; set; }
        public string DepartCode { get; set; }

        public List<HRSyncByUserDetailUserResultModel> Users { get; set; } = new List<HRSyncByUserDetailUserResultModel>();
    }

    public class HRSyncByUserDetailUserResultModel
    {
        public string UserId { get; set; }

        public int UserType { get; set; }
    }

    public class DepartLineParamModel
    {
        public List<string> DepartCodes { get; set; } = new List<string>();
    }

    public class DepartLineResultModel
    {
        public List<DepartLineDetailResultModel> Details { get; set; } = new List<DepartLineDetailResultModel>();
    }


    public class DepartLineDetailResultModel
    {

        public string DepartCode { get; set; }

        public string DepartName { get; set; }

        public string UserId { get; set; }
        public string UserCode { get; set; }
        public string UserName { get; set; }


        public string AliasUserId { get; set; }
        public string AliasUserCode { get; set; }
        public string AliasUserName { get; set; }

        /// <summary>
        /// 课别
        /// </summary>
        public string ShopDepartCode { get; set; }

        public string ShopDepartId { get; set; }

        public string ShopDepartName { get; set; }

        public string ShopUserId { get; set; }

        public string ShopUserCode { get; set; }

        public string ShopUserName { get; set; }

        public string ShopUserPhone { get; set; }

        /// <summary>
        /// 生产部
        /// </summary>
        public string SectionDepartCode { get; set; }

        public string SectionDepartId { get; set; }

        public string SectionDepartName { get; set; }

        public string SectionUserId { get; set; }

        public string SectionUserCode { get; set; }

        public string SectionUserName { get; set; }

        public string SectionUserPhone { get; set; }
    }






    public class UserDepartByUserIdParamModel
    {
        public List<string> UserIds { get; set; } = new List<string>();
    }

    public class UserDepartByUserIdResultModel
    {
        public List<UserDepartByUserIdDetailResultModel> Details { get; set; } = new List<UserDepartByUserIdDetailResultModel>();
    }
    public class UserDepartByUserIdDetailResultModel
    {
        public string UserId { get; set; }
        public string UserCode { get; set; }
        public string UserName { get; set; }

        public string DepartId { get; set; }
        public string DepartCode { get; set; }

        public string DepartName { get; set; }

        public string DepartUserId { get; set; }
        public string DepartUserCode { get; set; }
        public string DepartUserName { get; set; }


        public string DepartAliasUserId { get; set; }
        public string DepartAliasUserCode { get; set; }
        public string DepartAliasUserName { get; set; }

        /// <summary>
        /// 课别
        /// </summary>
        public string ShopDepartCode { get; set; }
        public string ShopDepartId { get; set; }

        public string ShopDepartName { get; set; }

        public string ShopUserId { get; set; }
        public string ShopUserCode { get; set; }
        public string ShopUserName { get; set; }

        /// <summary>
        /// 生产部
        /// </summary>
        public string SectionDepartCode { get; set; }
        public string SectionDepartId { get; set; }

        public string SectionDepartName { get; set; }

        public string SectionUserId { get; set; }
        public string SectionUserCode { get; set; }
        public string SectionUserName { get; set; }
    }


    public class DepartLineByUserParamModel
    {
        public List<string> UserIds { get; set; } = new List<string>();
    }

    public class DepartLineByUserResultModel
    {
        public List<DepartLineByUserDetailResultModel> Details { get; set; } = new List<DepartLineByUserDetailResultModel>();
    }


    public class DepartLineByUserDetailResultModel : DepartLineDetailResultModel
    {
        public string SrcUserId { get; set; }

        public string SrcUserCode { get; set; }

        public string SrcUserName { get; set; }

    }


    public class UserLeaderParamModel
    {
        public List<string> UserIds { get; set; } = new List<string>();
    }

    public class UserLeaderResultModel
    {
        public List<UserLeaderDetailResultModel> Details { get; set; } = new List<UserLeaderDetailResultModel>();
    }


    public class UserLeaderDetailResultModel
    {
        public string UserId { get; set; }

        public string UserCode { get; set; }

        public string UserName { get; set; }


        public string LeaderUserId { get; set; }
        public string LeaderUserCode { get; set; }

        public string LeaderUserName { get; set; }


        public string DepartCode { get; set; }

        public string DepartName { get; set; }

        /// <summary>
        /// 操作人员
        /// </summary>
        public bool IsOperateUser { get; set; }


        public string LeaderDepartCode { get; set; }

        public string LeaderDepartName { get; set; }

        public string LeaderDepartId { get; set; }
    }

    public class UpdateDepartLeaderUserParamModel
    {
        public List<UpdateDepartLeaderUserDetailParamModel> Details { get; set; } = new List<UpdateDepartLeaderUserDetailParamModel>();
    }

    public class UpdateDepartLeaderUserDetailParamModel
    {
        public string DepartCode { get; set; }

        public string UserId { get; set; }

        public string AliasUserId { get; set; }
    }

    public class HRSyncUserCerParamModel
    {
        public string OrgId { get; set; }

        public string Url { get; set; }

        public string UserCode { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }
    }

    public class UpExtUserCerParamModel
    {
        /// <summary>
        /// 人员编号  可以逗号隔开
        /// </summary>
        public string UserCode { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }
    }

    public class UpExtUserCerModel
    {
        /// <summary>
        /// 员工编号
        /// </summary>
        public string emp_id { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string cn_name { get; set; }

        /// <summary>
        /// 证书编号
        /// </summary>
        public string certificate_id { get; set; }

        /// <summary>
        /// 证书名称
        /// </summary>
        public string certificate_name { get; set; }

        /// <summary>
        /// 证书类型编号
        /// </summary>
        public string type_id { get; set; }

        /// <summary>
        /// 证书类型名称
        /// </summary>
        public string type_name { get; set; }

        /// <summary>
        /// 发证机构
        /// </summary>
        public string agency { get; set; }

        /// <summary>
        /// 证书生效日期
        /// </summary>
        public DateTime expire_from { get; set; }

        /// <summary>
        /// 证书失效日期
        /// </summary>
        public DateTime expire_to { get; set; }

        /// <summary>
        /// 证书获取日期
        /// </summary>
        public DateTime receive_time { get; set; }

        /// <summary>
        /// 持有期限（月）
        /// </summary>
        public int hold_month { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime modi_time { get; set; }
    }

    public class HRSyncUserCerResultModel
    {
        public decimal Count { get; set; }
        public string Message { get; set; }
    }
}
